Vcenter NamespaceManagement InfrastructurePolicies CreateSpec

Vcenter NamespaceManagement InfrastructurePolicies CreateSpec
Vcenter NamespaceManagement InfrastructurePolicies CreateSpec

The Vcenter NamespaceManagement InfrastructurePolicies CreateSpec schema defines the specification for creating policies.

This schema was added in vSphere API 9.1.0.0.

JSON Example
{
    "policy": "string",
    "description": "string",
    "compute_policy_id": "string",
    "enforcement_mode": "string",
    "match": {
        "op": "string",
        "match": [
            "Vcenter NamespaceManagement InfrastructurePolicies MatchSpec Object"
        ],
        "workload": {
            "guest": {
                "guest_id": {
                    "op": "string",
                    "value": "string"
                },
                "guest_family": {
                    "op": "string",
                    "value": "string"
                }
            },
            "labels": [
                {
                    "key": "string",
                    "operator": "string",
                    "values": [
                        "string"
                    ]
                }
            ],
            "kind": "string"
        }
    }
}
string
policy
Required

Identifier of the policy. This has DNS label restrictions as specified in . This must be an alphanumeric (a-z and 0-9) string and with maximum length of 63 characters and with the '-' character allowed anywhere except the first or last character. This name is unique in this vCenter server and cannot be changed after creation.

This property was added in vSphere API 9.1.0.0.

When clients pass a value of this schema as a parameter, the property must be an identifier for the resource type: com.vmware.vcenter.namespace_management.INFRASTRUCTURE_POLICY. When operations return a value of this schema as a response, the property will be an identifier for the resource type: com.vmware.vcenter.namespace_management.INFRASTRUCTURE_POLICY.

string
description
Optional

Specifies the desired description of the policy.

This property was added in vSphere API 9.1.0.0.

If missing or null, no description is provided.

string
compute_policy_id
Optional

Specifies the UUID of the underlying vSphere com.vmware.vcenter.compute.Policy, if one is associated with this object.

This property was added in vSphere API 9.1.0.0.

If missing or null, no policy ID is specified.

When clients pass a value of this schema as a parameter, the property must be an identifier for the resource type: com.vmware.vcenter.compute.Policy. When operations return a value of this schema as a response, the property will be an identifier for the resource type: com.vmware.vcenter.compute.Policy.

string
enforcement_mode
Optional

Specifies how the policy is enforced.

For more information see: Vcenter NamespaceManagement InfrastructurePolicies EnforcementMode.

This property was added in vSphere API 9.1.0.0.

If missing or null, defaults to Vcenter NamespaceManagement InfrastructurePolicies EnforcementMode.MANDATORY.

match
Optional

Used to match workloads to which this policy should be applied.

This property was added in vSphere API 9.1.0.0.

If missing or null, policy applies to all workloads.